#include <iostream>
#include <memory>
#include <string>
#include "Util.hpp"
#include "error.hpp"
#include "HttpServer.hpp"
void Print()
{
    printf("Hello World\n");
    
}
void Usage(std::string proc)
{
    std::cout << "Usage:\n\t" << proc << " port" << std::endl;
}
int main(int argc , char* argv[])
{
    if(argc != 2)
    {
        Usage(argv[0]);
        exit(ARG_ERROR);
    }
    int port = std::atoi(argv[1]);
    std::shared_ptr<HttpServer> svr(new HttpServer(port));
    svr->Loop();
    std::cout << strerror(errno) << std::endl; 
    return 0;
}